<form id="editPassword"
      name="editPassword"
      role="form"
      novalidate
      ng-submit="vm.ok()"
      autocomplete="off">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.cancel()">&times;</button>
        <h5 class="modal-title" i-translate="CHANGE_PASSWORD"></h5>
    </div>
    <div class="modal-body">
        <simple-input validation-pattern-text="{{ ::vm.passwordValidationText }}">
            <span i-translate="NEW_PASSWORD"></span>
            <div class="password-block">
                <input class="form-control user-management-password__new-password"
                       name="password"
                       type="{{ vm.passwordIsVisible ? 'text' : 'password' }}"
                       autocomplete="new-password"
                       ng-model="vm.password"
                       ng-required="vm.password == null"
                       ng-maxlength="50"
                       ng-pattern="vm.passwordRegex">
                <i ng-click="vm.changePasswordVisibility()"
                   ng-class="vm.passwordIsVisible ? 'glyphicon glyphicon-eye-open pull-right eye-icon'
                                                  : 'glyphicon glyphicon-eye-close pull-right eye-icon'">
                </i>
            </div>
        </simple-input>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.cancel()">
            <span class="icon icon-stop"></span><span class="m-l5" i-translate="CANCEL"></span>
        </button>
        <button type="submit" ng-disabled="editPassword.$invalid" class="btn btn-info" i-translate="OK"></button>
    </div>
</form>
